package com.fishery.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fishery.entity.Result;
import com.fishery.order.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fishery.order.entity.vo.OrderVo;
import com.fishery.order.entity.vo.SaleOrderVo;
import com.fishery.order.entity.vo.SearchOrderConditionVo;
import org.aspectj.weaver.ast.Or;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单服务类
 * </p>
 *
 * @author run 、 ghost
 * @since 2021-01-31
 */
public interface OrderService extends IService<Order> {

	public boolean createOrder(Order order);

	public boolean deleteOrder(String orderId);

	public boolean deliverOrder(String orderId);

	public Order searchOrderById(String orderId);

	public List<Order> searchOrderOfBase(String baseId);

	public IPage<Order> searchOrderOfBase(String baseId, Integer page, Integer size);

	public boolean receiveOrder(String logisticsId);

	public boolean updateOrder(OrderVo orderVo);

	public SaleOrderVo searchSaleOrderOfBase(SearchOrderConditionVo searchOrderConditionVo);

	public Result traceInformationByProductIdAndSourceType(String productId, String sourceType);

	Map<String, Object> getSourceTypeAndProductIdById(String traceId);
}
